<html>
<body>
<script type="text/javascript">
var i=0;
while (i<=3)
  {
  alert("The number is " + i);
  document.write("<br />");
  i++;
  }
</script>
</body>
</html>